import {
  service
} from './request'

// 获取本机账号信息
export const getUserData = () => {
  return service({
    url: "/getCurrentSummoner",
    method: "get",
  });
}

/**
 * 查询本地召唤师rank信息
 */
export function getCurrentSummonerRankInfo() {
  return service({
    url: "/getCurrentSummonerRankInfo",
    method: "get",
  });
}

export function getCurrentSummonerRankInfoBySummonerId(params: any) {
  return service({
    url: "/getCurrentSummonerRankInfoBySummonerId",
    method: "get",
    params,
  });
}

/**
 *  根据puuid查询战绩
 */
export function getDataByPuuid(params: any) {
  return service({
    url: "/getDataByPuuid",
    method: "get",
    params,
  });
}

/**
 *  根据召唤师名称查询角色信息
 */
export function getDataByName(params: any) {
  return service({
    url: "/getSummonerInfoByName",
    method: "get",
    params,
  });
}
/**
 * id name
 * @param params 
 * @returns 
 */
export function getDataByNameId(params: any) {
  return service({
    url: "/getSummonerInfoByNameId",
    method: "get",
    params,
  });
}

// 根据 gameId 查询单场游戏信息
export function getGamesInfo(params: any) {
  return service({
    url: "/getGamesInfo",
    method: "get",
    params,
  });
}

// 根据 puuid 查询 SummonerGames
export function getSummonerGames(params: any) {
  return service({
    url: "/getSummonerGames",
    method: "get",
    params,
  });
}

// getFriends
export function getFriends() {
  return service({
    url: "/getFriends",
    method: "get"
  });
}